public class demo1 {
    public static void main(String[] args){
        int count=0;
        for(int x=100;x<1000;x++){
            int ge = x % 10;
            int shi = x / 10 % 10;
            int bai = x / 10 / 10 % 10;
            if(x == ge*ge*ge+shi*shi*shi+bai*bai*bai){
                System.out.println(x);
                count++;
            }
        }
        System.out.println("水仙花数共有"+count+"个");
    }
}

